<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue</title>
</head>
<style>
    .a{
        background-color: black;
    }
    .b{
        color: rgb(189, 39, 39);
    }


</style>

<body>
    <div id="test">
        <img v-bind:src="src" alt="">
        <div :class="{a:okk.a>0,b:okk.b>0}">郎云松</div>
    </div>
</body>

</html>


<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.8/vue.common.dev.js"></script>
<script>
    var vm = new Vue({
        el: "#test",
        data: {
            name: "郎云松",
            position: "重庆",
            src:"",
            black:"a",
            white:"b",
            okk:{
                a:100,
                b:100
            }

        }
    })
    console.log(vm);
</script>